<template>
  <div>
    <h3>Child</h3>
    <input type="text" :value="modelValue" 
      @input="$emit('update:modelValue', ($event.target as HTMLInputElement).value)">
    <br>
    <input type="text" :value="xxx" 
      @input="$emit('update:xxx', ($event.target as HTMLInputElement).value)">
  </div>
</template>

<script lang="ts">
export default {
  name: 'MyChild',
}
</script>

<script lang="ts" setup>

  // 声明接收属性
  defineProps(['modelValue', 'xxx'])
  // 定义自定义事件
  const emit = defineEmits(['update:modelValue', 'update:xxx'])
</script>

<style scoped>

</style>
